package com.xiao.community.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiao.group.common.utils.PageUtils;
import com.xiao.group.common.utils.Query;

import com.xiao.community.dao.PintuanOrderDao;
import com.xiao.community.entity.PintuanOrderEntity;
import com.xiao.community.service.PintuanOrderService;


@Service("pintuanOrderService")
public class PintuanOrderServiceImpl extends ServiceImpl<PintuanOrderDao, PintuanOrderEntity> implements PintuanOrderService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<PintuanOrderEntity> page = this.page(
                new Query<PintuanOrderEntity>().getPage(params),
                new QueryWrapper<PintuanOrderEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<PintuanOrderEntity> selectByPinTuanOrderId(Integer pintuanOrderId) {

        return baseMapper.selectList(new QueryWrapper<PintuanOrderEntity>().eq("pintuan_id",pintuanOrderId));
    }

}